/*
 * 百融不用做了
 * package com.marvels.approve.process.service.impl;

import java.text.SimpleDateFormat;
import java.util.ArrayList;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.marvels.approve.consum.ConsumerExternalApi;
import com.marvels.approve.loan.dto.ZxDataReqDTO;
import com.marvels.approve.loan.dto.ZxDataRespDTO;
import com.marvels.approve.process.dao.CreditReportingDao;
import com.marvels.approve.process.dto.CreditReportingDTO;
import com.marvels.approve.process.service.CreditDataService;
import com.marvels.common.exception.MarvelsBusinessException;
*//**
 * 百融征信数据
 * @author liuyk
 ** dataProvider
 * MOXIE("001", "魔蝎数据"), //
  PENGYUAN("002", "鹏元征信"), //
  QIANHAI("003", "前海征信"), //
  BAIRONG("004", "百融数据"), //
  FS("005", "富数"), //
  HQX("006", "合其信"), //
  HF("007", "汇法"), //
  SHZX("008", "上海征信"), //
  GJJ51("009", "51公积金"), //
  SB51("010", "51社保"), //
  KANIU("011", "卡牛征信数据");
  KANIU("012", "卡牛房贷数据");
  KANIU("013", "卡牛喜涮涮魔蝎数据（卡牛喜涮涮产品）");
  人行("014", "人行征信");
 *//*
@Service("creditDataBrServiceImpl")
public class CreditDataBrServiceImpl implements CreditDataService{
	@Autowired
	private ConsumerExternalApi consumerExternalApi;
	@Autowired
	private CreditReportingDao creditReportingDao;
	@Override
	public ZxDataRespDTO execute(String loanId) throws MarvelsBusinessException {
		Map map = creditReportingDao.getCustCardNo(loanId);//得到身份证
		ZxDataRespDTO respDTO = new ZxDataRespDTO();
		String dataProvider = "004";
		ZxDataReqDTO reqDto = new ZxDataReqDTO();
		reqDto.setCustCardNo(map.get("custCardNo")+"");
		reqDto.setMobileNo(map.get("mobileNo")+"");
		reqDto.setProductType(map.get("productType")+"");
		reqDto.setLoanId(loanId);
		respDTO = consumerExternalApi.getCreditData(reqDto, dataProvider);
		Object temObj = respDTO.getData();
		if (temObj!=null && temObj instanceof List) {
			List<Map> list = (List<Map>)temObj;
			for (int i = 0; i < list.size(); i++) {
				String status = (String)list.get(i).get("status");
				if ("1".equals(status)) {
					list.get(i).put("status", "成功");
				}else if ("0".equals(status)) {
					list.get(i).put("status", "无数据返回");
				}else if ("-1".equals(status)) {
					list.get(i).put("status", "第三方异常");
				}else if ("-99".equals(status)) {
					list.get(i).put("status", "落库失败");
				}else if ("-9".equals(status)) {
					list.get(i).put("status", "请求失败");
				}
				//服务名，与每个调用的bean名一致
				list.get(i).put("serviceType", "creditDataBrServiceImpl");
				//时间转成string
				SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
				String date  = formatter.format(list.get(i).get("created_date"));
				list.get(i).put("created_date", date);
			}
		}
		return respDTO;
	}
	@Override
	public ZxDataRespDTO getCreditDetail(String reqNo,  String loanId)
			throws MarvelsBusinessException {
		// TODO Auto-generated method stub
		return null;
	}

}*/
